import Account from '@/service/account'

export default {
  path: 'logout',
  beforeEnter (to, from, next) {
    if (Account.isLoggedIn()) {
      Account.logout()
    }

    next('/login')
  }
}
